package com.atguigu.controller;

import com.atguigu.prop.DataSourceProp;
import com.atguigu.prop.DataSourceProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class Hello01Controller {

    @GetMapping("/h01")
    public String h01() {
        return "h01";
    }
    @Autowired
   private DataSourceProperties dataSourceProperties;
    @GetMapping("/h02")
    public String h02() {
        return dataSourceProperties.toString();
    }
    @Autowired
    DataSourceProp dataSourceProp;
    @GetMapping("/h03")
    public String h03() {
        return dataSourceProp.toString();
    }
}
